<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }

		  return false;
		}
		$(document).ready(function() {
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});

					laydate({
			            elem: '#birthday', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
		});
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="xUser" action="${ctx}/xiongda/xUser/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>

				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>用户名：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.userName}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">等级：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.role==0?"管理员":"用户"}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">真实姓名：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.realName}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">身份证号码：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.idcard}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">昵称：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.nickName}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">头像：</label></td>
                    <td class="width-85">
                        <form:hidden id="headPicture" path="headPicture" htmlEscape="false" maxlength="255" class="form-control"/>
                        <sys:image input="headPicture"  selectMultiple="false"/>
                    </td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">性别：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.gender==0?"男":"女"}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">年龄：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.age}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">生日：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;<fmt:formatDate value="${xUser.birthday}" pattern="yyyy-MM-dd"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">QQ：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.qq}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">电子邮箱：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.email}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">电话：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.phone}
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">地址：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.address}
					</td>
				</tr>
                <tr>
                    <td class="width-15 active"><label class="pull-right">是否激活：</label></td>
                    <td class="">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.activated==0?"未激活":"已激活"}
                    </td>
                </tr>
                <tr>
                    <td class="width-15 active"><label class="pull-right">是否冻结：</label></td>
                    <td class="">
                        &nbsp;&nbsp;&nbsp;&nbsp;${XUser.locked==0?"已冻结":"未冻结"}
                    </td>
                </tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">创建时间：</label></td>
                    <td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;<fmt:formatDate value="${xUser.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">更新时间：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;<fmt:formatDate value="${xUser.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
				</tr>
				<tr>
					<td class="width-20 active"><label class="pull-right">最后登录时间：</label></td>
					<td class="width-85">
                        &nbsp;&nbsp;&nbsp;&nbsp;<fmt:formatDate value="${xUser.lastLoginTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>